package com.ibm.spatiotemp.index;

import org.apache.log4j.Logger;
/*key class, to support redis/io on Rtree index*/
public abstract class IndexDataLoader {

	public static Logger logger = Logger.getLogger(IndexDataLoader.class);
	
	/**
	 * find where is the key(in cache, or just on hdfs, and decide if to load it to redis)
	 * @param key: target key to be load from cache
	 * @param needcache: if the key and its value need to be cached
	 * @return
	 */
	public abstract int locateIndexByPathKey(String key,boolean needcache);
	
	public abstract byte[] loadIndexByPathKey(String key);
	
	public abstract void close();
	
	public abstract void uploadIndexByPathKey(String key, boolean overwrite);
}
